Skip to content

Checkout Translations#9107

Merged
pieterbeulque merged 74 commits intomainfrom
pieter/bare-bone-i18n
Feb 13, 2026
Merged

Checkout Translations#9107
pieterbeulque merged 74 commits intomainfrom
pieter/bare-bone-i18n

Conversation

@pieterbeulque
Copy link
Copy Markdown
Contributor

Cherry-picking from #9088 and #8755

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
polar Ready Ready Preview, Comment Feb 13, 2026 7:40am
polar-sandbox Ready Ready Preview, Comment Feb 13, 2026 7:40am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 9, 2026

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request implements checkout localization features for the Polar platform, cherry-picking work from PRs #9088 and #8755. It adds internationalization support to enable translated checkout experiences in multiple languages (Dutch, Spanish, French, Swedish, German, and Hungarian).

Changes:

  • Adds new i18n package with translation infrastructure and locale files
  • Implements locale detection and resolution from browser, API, and query parameters
  • Updates checkout components to support locale-aware rendering
  • Adds feature flag for organizations to enable checkout localization
  • Includes documentation and CI/CD workflow for translation management

Reviewed changes

Copilot reviewed 65 out of 66 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
server/polar/organization/schemas.py Added checkout_localization_enabled feature flag
server/polar/checkout/service.py Implements locale propagation from customer to checkout with feature flag check
clients/packages/i18n/* New i18n package with translations, utilities, and scripts
clients/packages/checkout/src/* Updated components to accept and use locale props
clients/apps/web/src/utils/i18n/* Locale resolution utilities for Next.js app
clients/apps/web/src/components/* Component updates to propagate locale throughout app
docs/features/checkout/localization.mdx Documentation for the localization feature
.github/workflows/i18n_translate.yml CI workflow for automated translation generation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 20 to 30
const ordinal = (number: number, locale: AcceptedLocale = 'en'): string => {
const rules = new Intl.PluralRules(locale, { type: 'ordinal' })
const category = rules.select(number)

if (getTranslationLocale(locale) === 'nl') {
return `${number}e`
}

const ordinal = (number: number): string => {
const category = ordinalRules.select(number)
const suffix = suffixes[category]
return number + suffix
const suffix = enSuffixes[category] ?? ''
return `${number}${suffix}`
}
Copy link

Copilot AI Feb 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ordinal function only handles Dutch ('nl') as a special case. Other languages like French, Spanish, German, Swedish, and Hungarian may also require different ordinal formatting rules. Consider either handling all supported languages or documenting that only English and Dutch ordinals are currently supported.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Analysis for web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@pieterbeulque pieterbeulque merged commit 66ab302 into main Feb 13, 2026
20 checks passed
@pieterbeulque pieterbeulque deleted the pieter/bare-bone-i18n branch February 13, 2026 07:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants